import json

from django.conf import settings
from django.contrib.auth.models import AnonymousUser
from django.utils.deprecation import MiddlewareMixin
from common.core.response import ApiResponse


class AmtfMiddleware(MiddlewareMixin):
    def process_response(self, request, response):
        """
        :param request:
        :param response:
        :return:
        """
        # if response.status_code == 404:
        #     return ApiResponse(code=response.status_code, detail=f'没找到服务{request.path}')
        # else:        
        #     return response
        return response
